<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class ProjectTarget extends AppModel
{
    //

    /**
     * @param $sync_id
     * @param $review_project_id
     * @User: 刘海龙
     * @Date: 2021/7/29
     * @Time: 18:09
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     * 获取社区名称
     */
    public static function getTargetName($sync_id,$review_project_id){
        $model = ProjectTarget::where(['sync_id'=>$sync_id,'review_project_id'=>$review_project_id])->find();
        if (is_null($model)){
            return ['code'=>403,'message'=>'数据不存在'];
        }
        return  $model->toArray();
    }
}
